﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace snat.util {
    public class DataChartOptions : INotifyPropertyChanged {

        private string title;
        public string Title {
            get { return title; }
            set {
                title = value;
                if(PropertyChanged != null) {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Title"));
                }
            }
        }
        private string legendTitle;
        public string LegendTitle {
            get { return legendTitle; }
            set {
                legendTitle = value;
                if(PropertyChanged != null) {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("LegendTitle"));
                }
            }
        }
        private string description;
        public string Description {
            get { return description; }
            set {
                description = value;
                if(PropertyChanged != null) {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Description"));
                }
            }
        }

        public DataChartOptions() {
            this.title = "";
            this.description = "";
            this.legendTitle = "Legend";
        }

        public DataChartOptions(string title) {
            this.title = title;
            this.description = "Use DataChartOptions.Description to replace this text.";
            this.legendTitle = "Legend";
        }

        public DataChartOptions(string title, string legendTitle) {
            this.title = title;
            this.description = "";
            this.legendTitle = legendTitle;
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
